Deep Dive
Build Paths
- Studio (No-code Interface)
- Lyzr Developer API (Programmatic Access)
Agents
- Overview
- Studio
- Publish Agent
- API Endpoints
Knowledge Base
- Overview
- Semantic Model
- Studio
- API Endpoints
Tools
- Available Tools
- Tools List
- Custom Tools
- API Endpoints
Responsible & Safe AI
- Overview
- Responsible AI
- Safe AI Studio
- API Endpoints
Orchestration
API Endpoints
Create Agent
POST
/
agents
/
Copy
Ask AI
curl --request POST \
--url https://agent-prod.studio.lyzr.ai/v3/agents/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tools": [
"<string>"
],
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}'
Copy
Ask AI
{
"id": 12345,
"message": "Agent created successfully."
}
Endpoint:
POST /v3/agents/
Description:
Creates a new agent with a specific configuration.
Request Headers:
Header | Type | Required | Description |
---|---|---|---|
x-api-key | String | Yes | API key for authentication |
accept | String | Yes | Expected response format (application/json) |
content-type | String | Yes | Format of request body (application/json) |
Request Body:
Copy
Ask AI
{
"name": "string",
"system_prompt": "string",
"description": "string",
"features": [
{
"type": "string",
"config": {},
"priority": 0
}
],
"tools": ["string"],
"llm_credential_id": "string",
"provider_id": "string",
"model": "string",
"top_p": 0,
"temperature": 0,
"response_format": {}
}
Request Example (cURL):
Copy
Ask AI
curl -X POST "https://agent-prod.studio.lyzr.ai/v3/agents/" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-XXXXXXX" ^
-d "{\"name\":\"string\",\"system_prompt\":\"string\",\"description\":\"string\",\"features\":[{\"type\":\"string\",\"config\":{},\"priority\":0}],\"tools\":[\"string\"],\"llm_credential_id\":\"string\",\"provider_id\":\"string\",\"model\":\"string\",\"top_p\":0,\"temperature\":0,\"response_format\":{}}"
Example Agent Configuration:
Copy
Ask AI
{
"api_key": "sk-default-XXXXXXX",
"template_type": "single_task",
"name": "Nutrition Expert",
"description": "Personalized Nutrition Assistant",
"agent_role": "You are a NUTRITION EXPERT...",
"agent_instructions": "Your task is to assist users in optimizing their diet...",
"examples": null,
"features": [
{
"type": "SINGLE_TOOL_CALL",
"config": {
"module_mode": "Post"
},
"priority": 0
}
],
"tool": "notion",
"tool_usage_description": "Provide dietary plans and nutrition advice in a structured format.",
"response_format": null,
"provider_id": "OpenAI",
"model": "gpt-4o-mini",
"top_p": 0.9,
"temperature": 0.7,
"version": "3",
"llm_credential_id": "lyzr_openai"
}
Authorizations
Body
application/json
Response
201
application/json
Agent created successfully
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://agent-prod.studio.lyzr.ai/v3/agents/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "<string>",
"system_prompt": "<string>",
"description": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tools": [
"<string>"
],
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}'
Copy
Ask AI
{
"id": 12345,
"message": "Agent created successfully."
}
Assistant
Responses are generated using AI and may contain mistakes.